package com.traffic.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

import static com.baomidou.mybatisplus.annotation.FieldFill.INSERT;
import static com.baomidou.mybatisplus.annotation.FieldFill.INSERT_UPDATE;

/**
 * Created by IntelliJ IDEA.
 * User: KingRainGrey
 * Date: 2020/9/7
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@TableName("cts_resources")
public class Resource implements Serializable {
    private static final long serialVersionUID = -7234983960499258444L;

    private Long id;

    private String name;

    private String url;

    // 管理员0  用户1
    private Integer kind;

    // 管理员 0-启动页 1-logo 2-消息配图
    // 用户 0-头像 1-反馈意见配图
    private Integer type;

    private Long createBy;

    @TableField(fill = INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
}
